package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomReportCardDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomReportCardEntity;
import com.healthcloud.service.losewisdom.LoseWisdomReportCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


@Service("loseWisdomReportCardService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomReportCardServiceImpl implements LoseWisdomReportCardService {

	@Autowired
	private LoseWisdomReportCardDao loseWisdomReportCardDao;
	
	@Override
	public LoseWisdomReportCardEntity queryObject(Integer id){
		return loseWisdomReportCardDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomReportCardEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomReportCardDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomReportCardDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomReportCardEntity loseWisdomReportCard){
		loseWisdomReportCard.setCreateTime(new Date());
		loseWisdomReportCardDao.save(loseWisdomReportCard);
	}
	
	@Override
	public void update(LoseWisdomReportCardEntity loseWisdomReportCard){
		loseWisdomReportCard.setUpdateTime(new Date());
		loseWisdomReportCardDao.update(loseWisdomReportCard);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomReportCardDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomReportCardDao.deleteBatch(ids);
	}
	
}
